<?php

namespace App\Model;

class OrdersModel extends BaseModel
{
    protected $table = 'orders';

    protected $primaryKey = 'order_id';
    protected $fillable = [
        'order_code',
        'status',
        'user_id',
        'price',
    ];

    public function goods(): \Illuminate\Database\Eloquent\Relations\HasMany
    {
        return $this->hasMany(OrderChildsModel::class,'order_code','order_code');
    }
}
